==========================================================================================
Commonly Used Codes
==========================================================================================

==========================================================================================
R_KFM.cns
==========================================================================================

==========================================================================================
Voicelines/Sounds
==========================================================================================

[State 1, ]
type = PlaySnd
trigger1 = AnimElem = 1
value = 200, 0+random%3
channel = 0

[State 1, ]
type = PlaySnd
trigger1 = animelem = 1
value = 0, 3

==========================================================================================
Explod
==========================================================================================

[State 300, Effect]
type = explod
trigger1 = AnimElem = 1
anim = 200	
id = 200
pos = 0,0
facing = 1
sprpriority = 3
bindtime = -1
ownpal = 1
ignorehitpause = 1
scale = 0.315,0.315

==========================================================================================
Targetstate + Envshake + Vignette (Used for heavy attacks.)
==========================================================================================

[State 3906,]
type = EnvShake
trigger1 = movehit = 1
time = 10
freq = 150
ampl = -5
ignorehitpause = 1
persistent = 0

[State 8000, ]
type = playsnd
trigger1 = movehit = 1
value = 3002,1
ignorehitpause = 1
persistent = 0

[state 19001 BF]
type = Explod
trigger1 = movehit = 1
anim = 6985
pos = 0,0
bindtime = -1
postype = back
ownpal = 1
scale = .85,.85
ignorehitpause = 1
persistent = 0
sprpriority = 5
SuperMoveTime = 99999
PauseMoveTime = 99999

==========================================================================================
Standard Hitdef Basic Attack
==========================================================================================

[State 210, 2]
type = HitDef
trigger1 = !movecontact && !movereversed
triggerall = enemynear,movetype != A
attr = S, SA
animtype  = Medium
damage    = ceil(15), 0
hitflag = MAFD
guardflag = MA
pausetime = 6,6
sparkno = 2
sparkxy = -10,-70
hitsound   = S5,3
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 25
ground.velocity = -1
air.velocity = -1,-1.5
air.fall = 1
fall.recovertime = 30
guard.ctrltime = 15
nochainID = 8000
guard.kill = 0

[State 210, 2]
type = HitDef
trigger1 = !movecontact && !movereversed
triggerall = enemynear,movetype = A
attr = S, SA
animtype  = Medium
damage    = ceil(15), 0
hitflag = MAFD
guardflag = MA
pausetime = 6,6
sparkno = 2
sparkxy = -10,-70
hitsound   = S5,3
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 25
ground.velocity = -1
air.velocity = -1,-1.5
air.fall = 1
fall.recovertime = 30
guard.ctrltime = 15
nochainID = 8000
guard.kill = 0

[State 200, Damage Scaling]
type = varset
trigger1 = movehit
trigger1 = !moveguarded
fvar(4) = fvar(4)*0.95
ignorehitpause = 1
persistent = 0

==========================================================================================
Helper.cns
==========================================================================================

==========================================================================================
Helper Hitdef
==========================================================================================

[State 600, 2]
type = HitDef
trigger1 = enemynear,movetype != A
trigger1 = !movecontact && !movereversed
attr = A, SP
damage    = ceil(50*root,fvar(4)),3
hitflag = MAFD
guardflag = MA
priority = 3
pausetime = 0,10
sparkno = 3
sparkxy = -10,0
hitsound   = S5,7
guardsound = S6,0
animtype = Med
ground.type = High
ground.slidetime = 10
ground.hittime  = ceil(15*(root,fvar(11)))
guard.ctrltime = 15
ground.velocity =  -1,-3
air.velocity = -1,-3
air.hittime = 15
air.fall = 1
fall = 1
fall.recovertime = 35
guard.kill = 1

[State 600, 2]
type = HitDef
trigger1 = enemynear,movetype = A
trigger1 = !movecontact && !movereversed
attr = A, SP
damage    = ceil(60*root,fvar(4)),3
hitflag = MAFD
guardflag = MA
priority = 3
pausetime = 0,10
sparkno = 3
sparkxy = -10,0
hitsound   = S5,7
guardsound = S6,0
animtype = Med
ground.type = High
ground.slidetime = 10
ground.hittime  = ceil(15*(root,fvar(11)))
guard.ctrltime = 15
ground.velocity =  -1,-3
air.velocity = -1,-3
air.hittime = 15
air.fall = 1
fall = 1
fall.recover = 0
guard.kill = 1

[State 200, Damage Scaling]
type = parentvarset
trigger1 = movehit
fvar(4) = root,fvar(4)*0.9
ignorehitpause = 1
persistent = 0

[State -2, Ultra Bust Active]
type = attackmulset
triggerall = root,fvar(19) > 0
trigger1 = 1
value = 1.2
ignorehitpause = 1

[State -2, Explod];Counter message
type = Explod
triggerall = numenemy
triggerall = root,var(56) = 1 && numexplod(13000) = 0 && teamside = 1
triggerall = enemy, movetype = h
trigger1 = movehit
anim = 9888
pos = 5,75
postype = left
removetime = -2
supermove = 1
scale = 0.25,0.25
sprpriority = 0
id = 13000
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = -1

[State -2, Explod];Counter message
type = Explod
triggerall = numenemy
triggerall = root,var(56) = 1 && numexplod(13000) = 0 && teamside = 2
triggerall = enemy, movetype = h
trigger1 = movehit
anim = 9888
pos = -65,75
postype = right
removetime = -2
supermove = 1
scale = 0.25,0.25
sprpriority = 0
id = 13000
bindtime = -1
ontop = 1
ownpal = 1
ignorehitpause = 1
pausemovetime = -1

[State 1300]
type = helper
trigger1 = movecontact = 1
helpertype = normal
stateno = 7777
ID = 7777
name = "You May Rapid"
postype = p1
pos = 0, 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 9999

[State 1300]
type = helper
trigger1 = movecontact = 1
helpertype = normal
stateno = 7777
ID = 7771
name = "You May Cancel"
postype = p1
pos = 0, 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 9999
